#ifndef __HAL_SLAVE_FLOOR_H__
#define __HAL_SLAVE_FLOOR_H__

#include <stdint.h>

#define SLAVE_FOR_TEST	1

#define FLOOR_SLAVE_LOCK_RCU			RCC_AHBPeriph_GPIOC
#define FLOOR_SLAVE_DOOR_RCU			RCC_AHBPeriph_GPIOB

#define SLAVE_LOCK_PIN					GPIO_Pin_13
#define SLAVE_DOOR_PIN					GPIO_Pin_11

#define SLAVE_LOCK_BASE					GPIOC
#define SLAVE_DOOR_BASE					GPIOB

#if SLAVE_FOR_TEST
	#define FLOOR_SLAVE_PC_RCU			RCC_AHBPeriph_GPIOA
	#define SLAVE_PC_BASE		GPIOA
	#define SLAVE_PC_PIN			GPIO_Pin_6
#else
	#define FLOOR_SLAVE_PC_RCU		RCC_AHBPeriph_GPIOB
	#define SLAVE_PC_BASE			GPIOB
	#define SLAVE_PC_PIN			GPIO_Pin_13
#endif 



typedef struct slave_floor_ctrl {
	void (*init)(void);
	void (*door_ctrl)(uint8_t flag);
	uint8_t (*get_lock_state)(void);
	uint8_t (*get_pc_state)(void);
}slave_floor_ctrl_t;

extern const slave_floor_ctrl_t g_slave_ctrl_;

#endif //__HAL_SLAVE_FLOOR_H__
